
#include <iostream>
#include <cuda.h>
#include <cuda_runtime.h>

int static_func(int);

void test_functions()
{
  static_func( int(42) );
}

int main(int argc, char **argv)
{
  test_functions();

  cudaError_t err;
  int nDevices = 0;
  err = cudaGetDeviceCount(&nDevices);
  if(err != cudaSuccess)
    {
      return 1;
    }
  std::cout << "this executable uses cuda code" << std::endl;
  std::cout << "and also uses dynamic libraries that have cuda code" << std::endl;
  std::cout << "you have " << nDevices << " devices that support cuda" << std::endl;
  return 0;
}